<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>day5</title>
<style>
    .box1{
        width: 50px;
        height: 50px;
        background-color: cyan;
        margin-bottom: 10px;
        position: static;
    }
    .box2{
        width: 50px;
        height: 50px;
        margin-bottom: 10px;
        background-color: cyan;
        position: relative;
        top: 50px;
        left: 50px;
        
    }
    .box3{
        width: 50px;
        height: 50px;
        margin-bottom: 10px;
        background-color: cyan;
        position: absolute;
        top: 150px;
        left: 150px;
        
    }
    .box4{
        width: 50px;
        height: 50px;
        margin-bottom: 10px;
        background-color: cyan;
        
        position: sticky;
        top: 50px;
        
    }
    .box5{
        width: 500px;
        height: 1000px;
        position: relative;
        top: 50px;
    }
    .box6{
        width: 0px;
        height: 0px;
        position: relative;
        top: 50px;
        border-left: 100px solid transparent;
        border-right:100px solid transparent;
        border-bottom:100px solid black;
    }
</style>
</head>
<body>
    <div class="box1">
        box1
    </div>

    <div class="box2">
        box2 
    </div>
    
    <div class="box3">
        box3
    </div>
    
    <div class="box4">
        box4
    </div>
    <div class="box5">
        相对位置：box2离box1左50px上50px；<br>
        绝对位置：box3离左150px,离上150px; <br>
        粘性定位:box4固定在窗口的距离上50px处;<br>
    </div>
    <h1>css画三角形</h1>
    <p>宽高为0，上面没有，左右透明，就是个朝上的三角形，边框设置粗一点</p>
    <div class="box6"></div>
</body>
</html>